package com.example.day12;

/**
 * @author Lenovo
 */
public class Cat {
    public void eat() {
        System.out.println("猫吃鱼");
    }
}
class CatOperator {
    public void useCat(Cat c) {
        c.eat();
    }
    public Cat getCat() {
        return new Cat();
    }
    public static class CatDemo {
        public static void main(String[] args) {
            CatOperator co = new CatOperator();
            co.useCat(new Cat());
            Cat c = co.getCat();
            c.eat();
        }
    }
}

